community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1738952 - /comdev/projects.apache.org/scripts/cronjobs/pubsubber.py
Date Wed, 13 Apr 2016 14:42:27 GMT
Author: sebb
Date: Wed Apr 13 14:42:26 2016
New Revision: 1738952

URL: http://svn.apache.org/viewvc?rev=1738952&view=rev
Log:
Tweak

Modified:
    comdev/projects.apache.org/scripts/cronjobs/pubsubber.py

Modified: comdev/projects.apache.org/scripts/cronjobs/pubsubber.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/scripts/cronjobs/pubsubber.py?rev=1738952&r1=1738951&r2=1738952&view=diff
==============================================================================
--- comdev/projects.apache.org/scripts/cronjobs/pubsubber.py (original)
+++ comdev/projects.apache.org/scripts/cronjobs/pubsubber.py Wed Apr 13 14:42:26 2016
@@ -7,25 +7,32 @@ from datetime import datetime
 import os
 import sys
 import logging
+import atexit
+import signal
+import json
+import re
+import time
+import subprocess
+import base64
 
 version = 2
 if sys.hexversion < 0x03000000:
     print("Using Python 2...")
-    import json, httplib, urllib, urllib2, ConfigParser as configparser, re, base64, sys,
os, time, atexit, signal, logging, socket, subprocess
+    import httplib, urllib, urllib2, ConfigParser as configparser, socket
     socket._fileobject.default_bufsize = 0
 else:
     print("Using Python 3")
     version = 3
-    import json, http.client, urllib.request, urllib.parse, configparser, re, base64, sys,
os, time, atexit, signal, logging, subprocess
+    import http.client, urllib.request, urllib.parse, configparser
 
 
 debug = False
 logger = None
 watching={} # dict: key = path to watch, value = set() of paths to update on match
 
-###########################################################
-# Daemon class, curtesy of an anonymous good-hearted soul #
-###########################################################
+############################################################
+# Daemon class, courtesy of an anonymous good-hearted soul #
+############################################################
 class daemon:
         """A generic daemon class.
 
@@ -39,7 +46,7 @@ class daemon:
                 self.logfile = logfile
         
         def daemonize(self):
-                """Deamonize class. UNIX double fork mechanism."""
+                """Daemonize class. UNIX double fork mechanism."""
 
                 try: 
                         pid = os.fork() 



Mime
View raw message