summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDjMelik <melik@archlinux.us>2010-08-24 10:17:58 -0700
committerDjMelik <melik@archlinux.us>2010-08-24 10:17:58 -0700
commit954aba731e746dbeebcf78adb2bbcf04a7f1cd2c (patch)
treeefae151d88aaa86a4fe7f34b1908b22f0dba0d73
parent8f28c264cf375a55ce17f6cddfc3d591c2715713 (diff)
fixed double output bug for debian/ubuntu
-rw-r--r--archey16
1 files changed, 7 insertions, 9 deletions
diff --git a/archey b/archey
index 57227f0..90537b0 100644
--- a/archey
+++ b/archey
@@ -3,7 +3,7 @@
# archey [version 0.2.5]
#
# Maintained by Melik Manukyan <melik@archlinux.us>
-# Changes Jérôme Launay <jerome@projet-libre.org>
+# Changes Jerome Launay <jerome@projet-libre.org>
# Distributed under the terms of the GNU General Public License v3.
# See http://www.gnu.org/licenses/gpl.txt for the full license text.
#
@@ -37,7 +37,7 @@ result = []
# Options
if __name__=='__main__':
- parser = OptionParser(usage='%prog [-s, --screenshot]', description='Archey is a system information tool written in Python.', version="%prog 0.2.4")
+ parser = OptionParser(usage='%prog [-s, --screenshot]', description='Archey is a system information tool written in Python.', version="%prog 0.2.5")
parser.add_option('-s', '--screenshot',
action='store_true', dest='screenshot', help='take a screenshot')
(options, args) = parser.parse_args()
@@ -111,24 +111,22 @@ p1 = None
# Find Distro.
DetectUbuntu = os.path.exists('/etc/lsb-release')
if DetectUbuntu:
+ DetectDebian = False
DetectUbuntu = Popen(['grep', '-i', 'ubuntu', '/etc/lsb-release'], stdout=PIPE)
DetectArch = os.path.exists('/etc/arch-release')
-DetectDebian = os.path.exists('/etc/debian_version')
-
+if not DetectUbuntu:
+ DetectDebian = os.path.exists('/etc/debian_version')
# Print coloured key with normal value.
def output(key, value):
if DetectUbuntu:
- ucolor = '\x1b[1;31m'
- output ='%s%s:%s %s' % (ucolor, key, clear, value)
+ output ='%s%s:%s %s' % (ucolor2, key, clear, value)
if DetectArch:
- ucolor = '\x1b[1;34m'
output = '%s%s:%s %s' % (acolor, key, clear, value)
if DetectDebian:
- ucolor = '\x1b[1;33m'
- output = '%s%s:%s %s' % (acolor, key, clear, value)
+ output = '%s%s:%s %s' % (dcolor, key, clear, value)
result.append(output)
# RAM Function.