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

fix: SafeConfigParser renamed to ConfigParser #46

Merged
merged 2 commits into from
Aug 11, 2018
Merged

fix: SafeConfigParser renamed to ConfigParser #46

merged 2 commits into from
Aug 11, 2018

Conversation

zetxx
Copy link

@zetxx zetxx commented Aug 6, 2018

after latest system update this error has popped up:

archey3:862: DeprecationWarning: The SafeConfigParser class has been renamed to ConfigParser in Python 3.2. This alias will be removed in future versions. Use ConfigParser directly instead.
  config = ArcheyConfigParser()
Traceback (most recent call last):
  File "/usr/bin/archey3", line 805, in parse_display
    raise StopIteration
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/bin/archey3", line 869, in <module>
    main()
  File "/usr/bin/archey3", line 866, in main
    archey.run(options.screenshot)
  File "/usr/bin/archey3", line 728, in run
    print(self.render())
  File "/usr/bin/archey3", line 734, in render
    results = self.prepare_results()
  File "/usr/bin/archey3", line 753, in prepare_results
    for cls_name, args in self.parse_display():
RuntimeError: generator raised StopIteration

after latest system update this error has popped up:
```
archey3:862: DeprecationWarning: The SafeConfigParser class has been renamed to ConfigParser in Python 3.2. This alias will be removed in future versions. Use ConfigParser directly instead.
  config = ArcheyConfigParser()
Traceback (most recent call last):
  File "/usr/bin/archey3", line 805, in parse_display
    raise StopIteration
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/bin/archey3", line 869, in <module>
    main()
  File "/usr/bin/archey3", line 866, in main
    archey.run(options.screenshot)
  File "/usr/bin/archey3", line 728, in run
    print(self.render())
  File "/usr/bin/archey3", line 734, in render
    results = self.prepare_results()
  File "/usr/bin/archey3", line 753, in prepare_results
    for cls_name, args in self.parse_display():
RuntimeError: generator raised StopIteration
```
also remove StopIteration exeption
@@ -802,7 +802,6 @@ class Archey(object):
args = ()

yield groups["func"], args
raise StopIteration

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would argue that this shouldn't be removed, but just changed to return

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im not keen with python, so let author decide

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine.

@lclarkmichalek lclarkmichalek merged commit 02ec857 into lclarkmichalek:master Aug 11, 2018
lclarkmichalek added a commit that referenced this pull request Aug 11, 2018
Incorporates fix for recently python, #46
@zetxx zetxx deleted the patch-1 branch August 12, 2018 11:13
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

3 participants