Changeset 32c0841 in sasview for guiframe/version.py


Ignore:
Timestamp:
Nov 23, 2010 11:21:20 AM (14 years ago)
Author:
Gervaise Alina <gervyh@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
a54e4be
Parents:
4a2b054
Message:

working on pylint

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guiframe/version.py

    rd955bf19 r32c0841  
    1111 
    1212 
    13 import sys, time 
    14 import subprocess, os 
     13import sys 
     14import time 
     15import subprocess 
     16import os 
    1517import getopt 
    1618from threading import Thread 
     
    4143        Start the sub-process used to read the version URL 
    4244        """ 
    43         self._process = subprocess.Popen([sys.executable, __file__, '-g', '-u%s' % version_url]) 
     45        self._process = subprocess.Popen([sys.executable, __file__, 
     46                                          '-g', '-u%s' % version_url]) 
    4447        self._t_0 = time.time() 
    4548         
     
    5154        accuracy of the version number that is returned. 
    5255        """ 
    53         if(time.time()-self._t_0<MAX_WAIT_TIME): 
     56        if(time.time() - self._t_0 < MAX_WAIT_TIME): 
    5457            if self._process.poll() is not None: 
    5558                return True 
     
    110113     
    111114    """ 
    112     import urllib, re 
     115    import urllib 
     116    import re 
    113117    try:  
    114118        h = urllib.urlopen(url) 
    115119        for line in h.readlines(): 
    116120            version = line.strip() 
    117             if len(re.findall('\d+\.\d+\.\d+$', version))>0: 
     121            if len(re.findall('\d+\.\d+\.\d+$', version)) > 0: 
    118122                write_version(version) 
    119123                return        
Note: See TracChangeset for help on using the changeset viewer.