diff options
author | Lars Wirzenius <liw@liw.fi> | 2019-06-16 19:33:44 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2019-06-16 19:33:44 +0300 |
commit | 220f34d4c5fe3e0a96b78f43d7a5eaebfbff3a00 (patch) | |
tree | 88790a2630fe99a253868feea3e0665ed76190e1 | |
parent | 3e3afc88242d7fdbdeca1810427cb7856bd3ed77 (diff) | |
download | jt-220f34d4c5fe3e0a96b78f43d7a5eaebfbff3a00.tar.gz |
-rw-r--r-- | jtlib/plugins/new_topic_plugin.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/jtlib/plugins/new_topic_plugin.py b/jtlib/plugins/new_topic_plugin.py index 1114bb4..38b4e55 100644 --- a/jtlib/plugins/new_topic_plugin.py +++ b/jtlib/plugins/new_topic_plugin.py @@ -37,9 +37,10 @@ class NewTopicCommand(cliapp.Plugin): pathname = self._topic_pathname(args[0]) self._create_topic_page(pathname, args[1]) - jtlib.commit_to_git(self.app.settings['source'], [pathname]) - if self.app.settings['push']: - jtlib.push_git(self.app.settings['source']) + if self.app.settings['git']: + jtlib.commit_to_git(self.app.settings['source'], [pathname]) + if self.app.settings['push']: + jtlib.push_git(self.app.settings['source']) def _topic_pathname(self, page_path): return os.path.join(self.app.settings['source'], page_path + '.mdwn') |