Show
Ignore:
Timestamp:
10/06/08 00:24:42 (16 years ago)
Author:
jerome
Message:

Removed spaces at EOL.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pkipplib/trunk/notifiers/samplenotifier

    r45 r3437  
    11#! /usr/bin/env python 
    2 # -*- coding: UTF-8 -*- 
     2# -*- coding: utf-8 -*- 
    33# 
    44# pkipplib : IPP and CUPS support for Python 
     
    99# the Free Software Foundation, either version 3 of the License, or 
    1010# (at your option) any later version. 
    11 #  
     11# 
    1212# This program is distributed in the hope that it will be useful, 
    1313# but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1414# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1515# GNU General Public License for more details. 
    16 #  
     16# 
    1717# You should have received a copy of the GNU General Public License 
    1818# along with this program.  If not, see <http://www.gnu.org/licenses/>. 
     
    3838    # First thing we do is put stdin in non-blocking mode. 
    3939    fd = sys.stdin.fileno() 
    40     fcntl.fcntl(sys.stdin.fileno(), fcntl.F_SETFL,  
     40    fcntl.fcntl(sys.stdin.fileno(), fcntl.F_SETFL, 
    4141                    fcntl.fcntl(fd, fcntl.F_GETFL) | os.O_NONBLOCK) 
    4242 
    4343    # then we read the notification CUPS sent us to our stdin 
    4444    notification = pkipplib.IPPRequest(sys.stdin.read()) 
    45      
     45 
    4646    # now we parse it 
    4747    notification.parse() 
    48      
     48 
    4949    # then we act one way or another, depending on the event received. 
    5050    event = notification.event_notification["notify-subscribed-event"][0][1] 
     
    5353        if event.endswith("-added") : 
    5454            action = "add" 
    55         else :     
     55        else : 
    5656            action = "delete" 
    5757        os.system('/usr/bin/pkprinters --%s "%s"' % (action, printername))