summaryrefslogtreecommitdiff
path: root/morphlib/util.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2011-10-17 19:54:55 +0100
committerLars Wirzenius <liw@liw.fi>2011-10-17 19:54:55 +0100
commit6961416a28270d3483d7ffd73539294cdb874403 (patch)
tree8caed7f40daeca490974938b701781a231b02ccc /morphlib/util.py
parent7bfd144ed0a1885ee9c4c4664a9bc82352af2937 (diff)
downloadmorph-6961416a28270d3483d7ffd73539294cdb874403.tar.gz
Move Builder.arch into util.arch.
This makes it easy to add a test case.
Diffstat (limited to 'morphlib/util.py')
-rw-r--r--morphlib/util.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/morphlib/util.py b/morphlib/util.py
index 850d943f..430fdc20 100644
--- a/morphlib/util.py
+++ b/morphlib/util.py
@@ -17,6 +17,15 @@
'''Utility functions for morph.'''
+import os
+
+
+def arch():
+ '''Return the CPU architecture of the current host.'''
+ return os.uname()[4]
+
+
+
def indent(string, spaces=4):
'''Return ``string`` indented by ``spaces`` spaces.