iredapd /

Diff from to

 # Author: Zhang Huangbin <zhb _at_>
-from os import umask, getpid, setuid
+import os
 import sys
 import pwd
 import socket
     sys.exit('Invalid backend, it must be ldap, mysql or pgsql.')
+sys.path.append(os.path.abspath(os.path.dirname(__file__)) + '/plugins')
 class PolicyChannel(asynchat.async_chat):
     """Process each smtp policy request"""
 def main():
     # Set umask.
-    umask(0077)
+    os.umask(0077)
     # Get log level.
     log_level = getattr(logging, str(settings.log_level).upper())
         # Write pid number into pid file.
         f = open(settings.pid_file, 'w')
-        f.write(str(getpid()))
+        f.write(str(os.getpid()))
         # Set uid.
-        setuid(uid)
+        os.setuid(uid)
         # Starting loop.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.