mantis-cli 9.0.2__tar.gz → 9.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.2
2
2
  Name: mantis-cli
3
- Version: 9.0.2
3
+ Version: 9.0.3
4
4
  Summary: Management command to build and deploy webapps, especially based on Django
5
5
  Home-page: https://github.com/PragmaticMates/mantis-cli
6
6
  Author: Erik Telepovský
@@ -0,0 +1 @@
1
+ VERSION = '9.0.3'
@@ -88,6 +88,12 @@ def main():
88
88
  # check params
89
89
  params = parse_args()
90
90
 
91
+ # version info
92
+ version_info = f'Mantis (v{VERSION})'
93
+
94
+ if params['commands'] == ['--version']:
95
+ exit(version_info)
96
+
91
97
  if len(params['commands']) == 0:
92
98
  CLI.error('Missing commands')
93
99
 
@@ -129,7 +135,7 @@ def main():
129
135
  else:
130
136
  host_intro = ''
131
137
 
132
- heading = f'Mantis (v{VERSION}) '\
138
+ heading = f'{version_info} '\
133
139
  f'{environment_intro}'\
134
140
  f'{host_intro}'\
135
141
  f'mode: {Colors.GREEN}{manager.mode}{Colors.ENDC}, '\
@@ -163,7 +163,8 @@ class DefaultManager(object):
163
163
  loaded_environment = self.load_environment(env_file) # .env
164
164
 
165
165
  if decrypted_environment is None:
166
- CLI.error(f'Decrypted environment {env_file} is empty!')
166
+ env_file_encrypted = f'{env_file}.encrypted'
167
+ CLI.error(f'Encrypted environment {env_file_encrypted} is empty!')
167
168
 
168
169
  if loaded_environment is None:
169
170
  CLI.error(f'Loaded environment {env_file} is empty!')
@@ -301,9 +302,12 @@ class DefaultManager(object):
301
302
 
302
303
  encrypted_lines = self.read_environment(env_file_encrypted)
303
304
 
304
- if not encrypted_lines:
305
+ if encrypted_lines is None:
305
306
  return None
306
307
 
308
+ if not encrypted_lines:
309
+ return {}
310
+
307
311
  decrypted_lines = []
308
312
  decrypted_env = {}
309
313
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.2
2
2
  Name: mantis-cli
3
- Version: 9.0.2
3
+ Version: 9.0.3
4
4
  Summary: Management command to build and deploy webapps, especially based on Django
5
5
  Home-page: https://github.com/PragmaticMates/mantis-cli
6
6
  Author: Erik Telepovský
@@ -1 +0,0 @@
1
- VERSION = '9.0.2'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes