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

Do not set timer if no cache_time #308

Merged
merged 1 commit into from
May 19, 2016
Merged

Conversation

tobes
Copy link
Contributor

@tobes tobes commented May 19, 2016

With #302 the problem appears to be when we wake a module that does not have its cache_time set

This PR checks for a cache_time value.

@ultrabug ultrabug added the bug 😞 I am reporting a bug label May 19, 2016
@ultrabug ultrabug self-assigned this May 19, 2016
@@ -106,6 +106,8 @@ def sleep(self):
def wake(self):
self.sleeping = False
cache_time = self.cache_time
Copy link
Owner

Choose a reason for hiding this comment

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

stupid question, but why assign this to a new variable when we could use self.cache_time wherever needed in this function ?

Copy link
Contributor Author

@tobes tobes May 19, 2016

Choose a reason for hiding this comment

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

habit I suppose (lookup costs - not relevant here). do you want it changed?

Copy link
Owner

Choose a reason for hiding this comment

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

I guess we should plz

@tobes
Copy link
Contributor Author

tobes commented May 19, 2016

As an aside the following modules do not have cached_until they probably should learn about it.

  • dpms
  • ns_checker
  • glpi

@ultrabug
Copy link
Owner

Also, I confirm this fixes my xrandr login crash problem (but I guess I need to fix smthing in the module too)

@ultrabug ultrabug merged commit fedcdb6 into ultrabug:master May 19, 2016
@ultrabug
Copy link
Owner

Thanks !

@tobes
Copy link
Contributor Author

tobes commented May 19, 2016

I think the issue here doesn't mean the xrandr module is broken

@tobes tobes deleted the wake-fix branch May 19, 2016 07:02
@ultrabug
Copy link
Owner

no, but I can say it is broken with -12 error codes I don't understand :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 😞 I am reporting a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants