summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Client/Tools/POSIX/Device.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-08-23 09:35:51 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-08-23 09:35:51 -0400
commit60bec519eadea232ce1f8f52d8fba0e1385858fb (patch)
tree0d67c11d78fdd2f650348b95691e7d9dca546865 /src/lib/Bcfg2/Client/Tools/POSIX/Device.py
parent0ce2a95d7fb0f6c4a00b19a5bfd3dcfa88cb90a7 (diff)
downloadbcfg2-60bec519eadea232ce1f8f52d8fba0e1385858fb.tar.gz
bcfg2-60bec519eadea232ce1f8f52d8fba0e1385858fb.tar.bz2
bcfg2-60bec519eadea232ce1f8f52d8fba0e1385858fb.zip
finally a relative import fix that works on py2.4 thru 3.2
Diffstat (limited to 'src/lib/Bcfg2/Client/Tools/POSIX/Device.py')
-rw-r--r--src/lib/Bcfg2/Client/Tools/POSIX/Device.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Client/Tools/POSIX/Device.py b/src/lib/Bcfg2/Client/Tools/POSIX/Device.py
index b8fb0f4d0..0ea4128f7 100644
--- a/src/lib/Bcfg2/Client/Tools/POSIX/Device.py
+++ b/src/lib/Bcfg2/Client/Tools/POSIX/Device.py
@@ -1,6 +1,10 @@
import os
import sys
-from base import POSIXTool, device_map
+try:
+ from base import POSIXTool, device_map
+except ImportError:
+ # py3k, incompatible syntax with py2.4
+ exec("from .base import POSIXTool, device_map")
class POSIXDevice(POSIXTool):
__req__ = ['name', 'dev_type', 'perms', 'owner', 'group']