|
@@ -106,7 +106,7 @@ class Blather:
|
106
|
106
|
(key, value) = line.split(":", 1)
|
107
|
107
|
print(key, value)
|
108
|
108
|
self.commands[key.strip().lower()] = value.strip()
|
109
|
|
- strings.write( key.strip()+"\n")
|
|
109
|
+ strings.write(key.strip() + "\n")
|
110
|
110
|
# Close the strings file
|
111
|
111
|
strings.close()
|
112
|
112
|
|
|
@@ -127,7 +127,7 @@ class Blather:
|
127
|
127
|
# Open and truncate the blather history file
|
128
|
128
|
hfile = open(history_file, "w")
|
129
|
129
|
for line in self.history:
|
130
|
|
- hfile.write( line+"\n")
|
|
130
|
+ hfile.write(line + "\n")
|
131
|
131
|
# Close the file
|
132
|
132
|
hfile.close()
|
133
|
133
|
|
|
@@ -221,7 +221,7 @@ class Blather:
|
221
|
221
|
paths = ["/usr/share/blather/", "/usr/local/share/blather", local_data]
|
222
|
222
|
for path in paths:
|
223
|
223
|
resource = os.path.join(path, string)
|
224
|
|
- if os.path.exists( resource ):
|
|
224
|
+ if os.path.exists(resource):
|
225
|
225
|
return resource
|
226
|
226
|
# If we get this far, no resource was found
|
227
|
227
|
return False
|
|
@@ -253,7 +253,7 @@ if __name__ == "__main__":
|
253
|
253
|
action='store',
|
254
|
254
|
help="command to run when a valid sentence is detected")
|
255
|
255
|
|
256
|
|
- parser.add_argument( "--invalid-sentence-command", type=str, dest="invalid_sentence_command",
|
|
256
|
+ parser.add_argument("--invalid-sentence-command", type=str, dest="invalid_sentence_command",
|
257
|
257
|
action='store',
|
258
|
258
|
help="command to run when an invalid sentence is detected")
|
259
|
259
|
|