summary refs log tree commit diff
diff options
context:
space:
mode:
authorClayton G. Hobbs <clay@lakeserv.net>2016-05-16 13:06:33 -0400
committerClayton G. Hobbs <clay@lakeserv.net>2016-05-16 13:06:33 -0400
commite3fd6a44b9824e1100b86a4f0278dc312bfb8cb0 (patch)
treec63c2e6aaf68eed147deab12a8cf10766f3ad1b5
parentd314f9480d57483dbab912dd9d60fc30131810b3 (diff)
Renamed Config.parser -> Config._parser
The argument parser isn't part of the API of the Config class, so now
its name reflects that.
-rw-r--r--kayleevc/util.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/kayleevc/util.py b/kayleevc/util.py
index 5155d06..7984dc3 100644
--- a/kayleevc/util.py
+++ b/kayleevc/util.py
@@ -43,34 +43,34 @@ class Config:
         self._make_dir(self.data_dir)
 
         # Set up the argument parser
-        self.parser = ArgumentParser()
-        self.parser.add_argument("-i", "--interface", type=str,
+        self._parser = ArgumentParser()
+        self._parser.add_argument("-i", "--interface", type=str,
                 dest="interface", action='store',
                 help="Interface to use (if any). 'g' for GTK or 'gt' for GTK" +
                 " system tray icon")
 
-        self.parser.add_argument("-c", "--continuous",
+        self._parser.add_argument("-c", "--continuous",
                 action="store_true", dest="continuous", default=False,
                 help="Start interface with 'continuous' listen enabled")
 
-        self.parser.add_argument("-p", "--pass-words",
+        self._parser.add_argument("-p", "--pass-words",
                 action="store_true", dest="pass_words", default=False,
                 help="Pass the recognized words as arguments to the shell" +
                 " command")
 
-        self.parser.add_argument("-H", "--history", type=int,
+        self._parser.add_argument("-H", "--history", type=int,
                 action="store", dest="history",
                 help="Number of commands to store in history file")
 
-        self.parser.add_argument("-m", "--microphone", type=int,
+        self._parser.add_argument("-m", "--microphone", type=int,
                 action="store", dest="microphone", default=None,
                 help="Audio input card to use (if other than system default)")
 
-        self.parser.add_argument("--valid-sentence-command", type=str,
+        self._parser.add_argument("--valid-sentence-command", type=str,
                 dest="valid_sentence_command", action='store',
                 help="Command to run when a valid sentence is detected")
 
-        self.parser.add_argument("--invalid-sentence-command", type=str,
+        self._parser.add_argument("--invalid-sentence-command", type=str,
                 dest="invalid_sentence_command", action='store',
                 help="Command to run when an invalid sentence is detected")
 
@@ -78,7 +78,7 @@ class Config:
         self._read_options_file()
 
         # Parse command-line arguments, overriding config file as appropriate
-        self.parser.parse_args(namespace=self.options)
+        self._parser.parse_args(namespace=self.options)
 
     def _make_dir(self, directory):
         if not os.path.exists(directory):