Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Hacker <dd0t@users.sourceforge.net>2010-04-11 17:20:49 +0400
committerStefan Hacker <dd0t@users.sourceforge.net>2010-04-11 17:20:49 +0400
commit00c1d7db1b217772210c7fde9132f7151b916535 (patch)
tree1cb0f2168fe1482e612ed2af7d666bac40942e5f /scripts
parente6d84a8a1b1ec9b4ccd1dc8e88ed2098c8ecd2bd (diff)
Make testdynamic.py work on windows systems
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/testdynamic.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/testdynamic.py b/scripts/testdynamic.py
index c47ff9feb..1fa0ea295 100755
--- a/scripts/testdynamic.py
+++ b/scripts/testdynamic.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8
-import Ice, IcePy, sys, tempfile
+import Ice, IcePy, sys, tempfile, os
ice = Ice.initialize(sys.argv)
@@ -9,13 +9,16 @@ proxy = ice.stringToProxy('Meta:tcp -h 127.0.0.1 -p 6502')
try:
slice = IcePy.Operation('getSlice', Ice.OperationMode.Idempotent, Ice.OperationMode.Idempotent, True, (), (), (), IcePy._t_string, ()).invoke(proxy, ((), None))
- slicefile = tempfile.NamedTemporaryFile(suffix = '.ice')
+ (slicefiledesc, slicefilepath) = tempfile.mkstemp(suffix = '.ice')
+ slicefile = os.fdopen(slicefiledesc, 'w')
slicefile.write(slice)
slicefile.flush()
- Ice.loadSlice('', ['-I' + Ice.getSliceDir(), slicefile.name])
+ Ice.loadSlice('', ['-I' + Ice.getSliceDir(), slicefilepath])
slicefile.close()
+ os.remove(slicefilepath)
+
print 'Using dynamic slice'
-except:
+except Exception:
Ice.loadSlice('', ['-I' + Ice.getSliceDir(), 'Murmur.ice'])
print 'Using bundled slice'