Changeset 32c0841 in sasview for guiframe/version.py
- Timestamp:
- Nov 23, 2010 11:21:20 AM (14 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/version.py
rd955bf19 r32c0841 11 11 12 12 13 import sys, time 14 import subprocess, os 13 import sys 14 import time 15 import subprocess 16 import os 15 17 import getopt 16 18 from threading import Thread … … 41 43 Start the sub-process used to read the version URL 42 44 """ 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]) 44 47 self._t_0 = time.time() 45 48 … … 51 54 accuracy of the version number that is returned. 52 55 """ 53 if(time.time() -self._t_0<MAX_WAIT_TIME):56 if(time.time() - self._t_0 < MAX_WAIT_TIME): 54 57 if self._process.poll() is not None: 55 58 return True … … 110 113 111 114 """ 112 import urllib, re 115 import urllib 116 import re 113 117 try: 114 118 h = urllib.urlopen(url) 115 119 for line in h.readlines(): 116 120 version = line.strip() 117 if len(re.findall('\d+\.\d+\.\d+$', version)) >0:121 if len(re.findall('\d+\.\d+\.\d+$', version)) > 0: 118 122 write_version(version) 119 123 return
Note: See TracChangeset
for help on using the changeset viewer.