Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing info for commandOutput resource #1339

Merged
merged 1 commit into from May 15, 2020

Conversation

tewfik-ghariani
Copy link
Contributor

Without this

raceback (most recent call last):
  File "/home/tewfikghariani/.cache/pypoetry/virtualenvs/nixops-grafana-FCCl2_6c-py3.7/bin/nixops", line 11, in <module>
    load_entry_point('nixops', 'console_scripts', 'nixops')()
  File "/home/tewfikghariani/.cache/pypoetry/virtualenvs/nixops-grafana-FCCl2_6c-py3.7/src/nixops/nixops/__main__.py", line 630, in main
    args.op(args)
  File "/home/tewfikghariani/.cache/pypoetry/virtualenvs/nixops-grafana-FCCl2_6c-py3.7/src/nixops/nixops/script_defs.py", line 342, in op_info
    print_deployment(depl)
  File "/home/tewfikghariani/.cache/pypoetry/virtualenvs/nixops-grafana-FCCl2_6c-py3.7/src/nixops/nixops/script_defs.py", line 305, in print_deployment
    r.resource_id or "" if r else "",
  File "/home/tewfikghariani/.cache/pypoetry/virtualenvs/nixops-grafana-FCCl2_6c-py3.7/src/nixops/nixops/resources/commandOutput.py", line 68, in resource_id
    self.commandName, hashlib.sha256(self.value).hexdigest()[:32]
TypeError: Unicode-objects must be encoded before hashing

With the fix

+------+--------+----------------+---------------------------------------+------------+
| Name | Status | Type           | Resource Id                           | IP address |
+------+--------+----------------+---------------------------------------+------------+
| test |   Up   | command-output | test-afc21edad3e1050cde1bde655014dd59 |            |
+------+--------+----------------+---------------------------------------+------------+

@grahamc
Copy link
Member

grahamc commented May 15, 2020

@adisbladis tells me my check for the docs requirements consistency is broken, so ignoring and merging. Thanks!

@grahamc grahamc merged commit a532656 into NixOS:master May 15, 2020
@tewfik-ghariani tewfik-ghariani deleted the fix-commandOutput-info branch May 15, 2020 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants