eva-shell 0.2.8__tar.gz → 0.2.9__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: 2.1
2
2
  Name: eva-shell
3
- Version: 0.2.8
3
+ Version: 0.2.9
4
4
  Summary: EVA ICS v4 shell
5
5
  Home-page: https://github.com/eva-ics/eva4
6
6
  Author: Bohemia Automation / Altertech
@@ -1,3 +1,3 @@
1
- __version__ = '0.2.8'
1
+ __version__ = '0.2.9'
2
2
 
3
3
  DEFAULT_REPOSITORY_URL = 'https://pub.bma.ai/eva4'
@@ -240,11 +240,21 @@ def print_action_result(result):
240
240
  print()
241
241
 
242
242
 
243
+ def convert_bytes(data):
244
+ if isinstance(data, bytes):
245
+ return list(data)
246
+ if isinstance(data, list):
247
+ return [convert_bytes(item) for item in data]
248
+ if isinstance(data, dict):
249
+ return {key: convert_bytes(value) for key, value in data.items()}
250
+ return data
251
+
252
+
243
253
  def print_result(data, need_header=True, name_value=False, cols=None):
244
254
  if current_command.json:
245
255
  from pygments import highlight, lexers, formatters
246
256
  import json
247
- j = json.dumps(data, indent=4, sort_keys=True)
257
+ j = json.dumps(convert_bytes(data), indent=4, sort_keys=True)
248
258
  if can_colorize():
249
259
  j = highlight(j, lexers.JsonLexer(), formatters.TerminalFormatter())
250
260
  print(j)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: eva-shell
3
- Version: 0.2.8
3
+ Version: 0.2.9
4
4
  Summary: EVA ICS v4 shell
5
5
  Home-page: https://github.com/eva-ics/eva4
6
6
  Author: Bohemia Automation / Altertech
@@ -1,4 +1,4 @@
1
- __version__ = '0.2.8'
1
+ __version__ = '0.2.9'
2
2
 
3
3
  import setuptools
4
4
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes