summaryrefslogtreecommitdiff
path: root/dev-python/twisted/files/trial
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-python/twisted/files/trial
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-python/twisted/files/trial')
-rwxr-xr-xdev-python/twisted/files/trial22
1 files changed, 22 insertions, 0 deletions
diff --git a/dev-python/twisted/files/trial b/dev-python/twisted/files/trial
new file mode 100755
index 000000000000..8da58861abf6
--- /dev/null
+++ b/dev-python/twisted/files/trial
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+# Copyright (c) Twisted Matrix Laboratories.
+# See LICENSE for details.
+import os, sys
+
+try:
+ import _preamble
+except ImportError:
+ try:
+ sys.exc_clear()
+ except AttributeError:
+ # exc_clear() (and the requirement for it) has been removed from Py3
+ pass
+
+# begin chdir armor
+sys.path[:] = map(os.path.abspath, sys.path)
+# end chdir armor
+
+sys.path.insert(0, os.path.abspath(os.getcwd()))
+
+from twisted.scripts.trial import run
+run()