[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] Rename cache files



commit 972f4a1b773b9b4bfb9a6127f1d7184e3cade5be
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Sat May 5 13:11:25 2018 -0700

    Rename cache files
    
    Shorter and more consistant names.
---
 setup.py                                                |   2 +-
 stem/{fallback_directories.cfg => cached_fallbacks.cfg} |   0
 stem/{cached_tor_manual.sqlite => cached_manual.sqlite} | Bin
 stem/directory.py                                       |   2 +-
 stem/manual.py                                          |   2 +-
 test/unit/installation.py                               |   3 +--
 6 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/setup.py b/setup.py
index 9e200bf1..1d674e13 100644
--- a/setup.py
+++ b/setup.py
@@ -106,7 +106,7 @@ try:
     keywords = 'tor onion controller',
     scripts = ['tor-prompt'],
     package_data = {
-      'stem': ['cached_tor_manual.sqlite', 'fallback_directories.cfg', 'settings.cfg'],
+      'stem': ['cached_fallbacks.cfg', 'cached_manual.sqlite', 'settings.cfg'],
       'stem.interpreter': ['settings.cfg'],
       'stem.util': ['ports.cfg'],
     }, classifiers = [
diff --git a/stem/fallback_directories.cfg b/stem/cached_fallbacks.cfg
similarity index 100%
rename from stem/fallback_directories.cfg
rename to stem/cached_fallbacks.cfg
diff --git a/stem/cached_tor_manual.sqlite b/stem/cached_manual.sqlite
similarity index 100%
rename from stem/cached_tor_manual.sqlite
rename to stem/cached_manual.sqlite
diff --git a/stem/directory.py b/stem/directory.py
index b7bc201f..4190e885 100644
--- a/stem/directory.py
+++ b/stem/directory.py
@@ -38,7 +38,7 @@ except ImportError:
 
 GITWEB_AUTHORITY_URL = 'https://gitweb.torproject.org/tor.git/plain/src/or/auth_dirs.inc'
 GITWEB_FALLBACK_URL = 'https://gitweb.torproject.org/tor.git/plain/src/or/fallback_dirs.inc'
-CACHE_PATH = os.path.join(os.path.dirname(__file__), 'fallback_directories.cfg')
+CACHE_PATH = os.path.join(os.path.dirname(__file__), 'cached_fallbacks.cfg')
 
 AUTHORITY_NAME = re.compile('"(\S+) orport=(\d+) .*"')
 AUTHORITY_V3IDENT = re.compile('"v3ident=([\dA-F]{40}) "')
diff --git a/stem/manual.py b/stem/manual.py
index 3d734026..f8e7ea96 100644
--- a/stem/manual.py
+++ b/stem/manual.py
@@ -81,7 +81,7 @@ except ImportError:
 
 Category = stem.util.enum.Enum('GENERAL', 'CLIENT', 'RELAY', 'DIRECTORY', 'AUTHORITY', 'HIDDEN_SERVICE', 'DENIAL_OF_SERVICE', 'TESTING', 'UNKNOWN')
 GITWEB_MANUAL_URL = 'https://gitweb.torproject.org/tor.git/plain/doc/tor.1.txt'
-CACHE_PATH = os.path.join(os.path.dirname(__file__), 'cached_tor_manual.sqlite')
+CACHE_PATH = os.path.join(os.path.dirname(__file__), 'cached_manual.sqlite')
 DATABASE = None  # cache database connections
 HAS_ENCODING_ARG = not stem.util.system.is_mac() and not stem.util.system.is_bsd() and not stem.util.system.is_slackware()
 
diff --git a/test/unit/installation.py b/test/unit/installation.py
index 15d9fe85..feb52d89 100644
--- a/test/unit/installation.py
+++ b/test/unit/installation.py
@@ -54,8 +54,7 @@ class TestInstallation(unittest.TestCase):
     # Checking that we have all non-source files. Data looks like...
     #
     #   package_data = {
-    #     'stem': ['cached_tor_manual.cfg', 'settings.cfg'],
-    #     'stem.descriptor': ['fallback_directories.cfg'],
+    #     'stem': ['cached_fallbacks.cfg', 'cached_manual.cfg', 'settings.cfg'],
     #   },
 
     package_data = {}



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits