mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 19:15:39 +00:00
19 lines
556 B
Diff
19 lines
556 B
Diff
diff --git a/pyslurm/__init__.py b/pyslurm/__init__.py
|
|
index 81643e1..e8b6836 100644
|
|
--- a/pyslurm/__init__.py
|
|
+++ b/pyslurm/__init__.py
|
|
@@ -11,8 +11,11 @@ import sys
|
|
old_dlopen_flags = ''
|
|
if hasattr(sys, "setdlopenflags"):
|
|
old_dlopen_flags = sys.getdlopenflags()
|
|
- import DLFCN
|
|
- sys.setdlopenflags(old_dlopen_flags | DLFCN.RTLD_GLOBAL)
|
|
+ if sys.version_info >= (3,6):
|
|
+ from os import RTLD_GLOBAL
|
|
+ else:
|
|
+ from DLFCN import RTLD_GLOBAL
|
|
+ sys.setdlopenflags(old_dlopen_flags | RTLD_GLOBAL)
|
|
|
|
from .pyslurm import *
|
|
|