community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1729046 - /comdev/reporter.apache.org/trunk/scripts/urlutils.py
Date Sun, 07 Feb 2016 22:37:17 GMT
Author: sebb
Date: Sun Feb  7 22:37:17 2016
New Revision: 1729046

URL: http://svn.apache.org/viewvc?rev=1729046&view=rev
Log:
Use private method for common code

Modified:
    comdev/reporter.apache.org/trunk/scripts/urlutils.py

Modified: comdev/reporter.apache.org/trunk/scripts/urlutils.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/scripts/urlutils.py?rev=1729046&r1=1729045&r2=1729046&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/scripts/urlutils.py (original)
+++ comdev/reporter.apache.org/trunk/scripts/urlutils.py Sun Feb  7 22:37:17 2016
@@ -142,6 +142,9 @@ class UrlCache(object):
     def __getname(self, name):
         return join(self.__cachedir, name)
 
+    def __getMarker(self, name):
+        return join(self.__cachedir, '.' + name)
+
     def _deleteCacheFile(self, name):# intended mainly for debug use
         path = self.__getname(name)
         try:
@@ -149,7 +152,7 @@ class UrlCache(object):
         except OSError as e:
             if not e.errno == errno.ENOENT:
                 raise e
-        dotpath = self.__getname('.'+name)
+        dotpath = self.__getMarker(name)
         try:
             os.remove(dotpath)
         except OSError as e:
@@ -183,7 +186,7 @@ class UrlCache(object):
         if useFileModTime:
             check = self.__getname(name)
         else:
-            check = self.__getname("."+name)
+            check = self.__getMarker(name)
         upToDate = False
         if fileTime >= 0:
             if self.__interval == -1:



Mime
View raw message