summaryrefslogtreecommitdiff
path: root/portato.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2008-04-08 20:15:14 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2008-04-08 20:15:14 +0200
commitc1710a1f1b2498670ba2af2eaada1ff4b54fc876 (patch)
treebc0361079e737d3b689f6b3a8f8306c1a3db96a9 /portato.py
parentba909e6b8972438cc22298301f4528d325703ceb (diff)
downloadportato-c1710a1f1b2498670ba2af2eaada1ff4b54fc876.tar.gz
portato-c1710a1f1b2498670ba2af2eaada1ff4b54fc876.tar.bz2
portato-c1710a1f1b2498670ba2af2eaada1ff4b54fc876.zip
Now recognize local shm module
Diffstat (limited to '')
-rwxr-xr-xportato.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/portato.py b/portato.py
index 3f94d25..c7cea74 100755
--- a/portato.py
+++ b/portato.py
@@ -75,10 +75,13 @@ def main ():
else: # start us again in root modus and launch listener
- try:
- import shm_wrapper as shm
+ try: # local version
+ from _shm import shm_wrapper as shm
except ImportError:
- from portato._shm import shm_wrapper as shm
+ try: # version installed together with portato
+ from portato._shm import shm_wrapper as shm
+ except ImportError: # the normal shm module
+ import shm_wrapper as shm
mem = shm.create_memory(1024, permissions=0600)
sig = shm.create_semaphore(InitialValue = 0, permissions = 0600)