summaryrefslogtreecommitdiff
path: root/src/common.py
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2011-01-09 00:09:51 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2011-01-09 00:09:51 +0000
commitcfc33090098ced22e18cfcbcbe25dab17d2b4a70 (patch)
tree334dae3be620e5f8116e80fe033f81d7d5b15688 /src/common.py
parent8017b2d9f1eceaf31aa95f87ee356ab8c114cde3 (diff)
downloadpoezio-cfc33090098ced22e18cfcbcbe25dab17d2b4a70.tar.gz
poezio-cfc33090098ced22e18cfcbcbe25dab17d2b4a70.tar.bz2
poezio-cfc33090098ced22e18cfcbcbe25dab17d2b4a70.tar.xz
poezio-cfc33090098ced22e18cfcbcbe25dab17d2b4a70.zip
restaure software version and local time
Diffstat (limited to 'src/common.py')
-rw-r--r--src/common.py15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/common.py b/src/common.py
index f19b872f..b909977c 100644
--- a/src/common.py
+++ b/src/common.py
@@ -122,19 +122,6 @@ DISTRO_INFO = {
'Redhat Linux': '/etc/redhat-release'
}
-def temp_failure_retry(func, *args, **kwargs):
- """
- workaround for a temporary and specific failure
- """
- while True:
- try:
- return func(*args, **kwargs)
- except (os.error, IOError, select.error) as ex:
- if ex.errno == errno.EINTR:
- continue
- else:
- raise
-
def get_os_info():
"""
Returns a detailed and well formated string containing
@@ -151,7 +138,7 @@ def get_os_info():
stdout=subprocess.PIPE,
close_fds=True)
process.wait()
- output = temp_failure_retry(process.stdout.readline).strip()
+ output = process.stdout.readline().decode('utf-8').strip()
# some distros put n/a in places, so remove those
output = output.replace('n/a', '').replace('N/A', '')
return output