Changeset 141

Show
Ignore:
Timestamp:
01/10/08 20:43:31 (1 year ago)
Author:
vud1
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • pytrainer/trunk/plugins/garmin-hr/main.py

    r134 r141  
    2929tmpgpx = "/tmp/reg.gpx" 
    3030dummy = 0 
    31 try: 
    32         os.system("gpsbabel -t -i garmin -f %s -o gtrnctr -F /tmp/file.gtrnctr" %options.device) 
    33         dummy = 1 
    34 except: 
     31 
     32if not os.path.exists(options.device): 
    3533        f = os.popen("zenity --error --text='Cant open garmin device. Check your configuration or connect the device correctly.'"); 
    36         dummy = 0 
     34 
     35else : 
     36        try: 
     37                os.system("gpsbabel -t -i garmin -f %s -o gtrnctr -F /tmp/file.gtrnctr" %options.device) 
     38                dummy = 1 
     39        except: 
     40                f = os.popen("zenity --error --text='Cant open garmin device. Check your configuration or connect the device correctly.'"); 
     41                dummy = 0 
    3742 
    3843if dummy == 1: