Skip to content

Commit 5db44e4

Browse files
authored
Merge pull request #30 from sudiptob2/patch/29-pwd-import-fix
Patch/29 pwd import fix
2 parents d2c56b5 + c476045 commit 5db44e4

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,10 @@ Fix:
2727

2828
Fix:
2929

30-
- Notification not working when `leeteasy` is scheduled with cronjob
30+
- Notification not working when `leeteasy` is scheduled with cronjob
31+
32+
## 1.0.2 (Alpha)
33+
34+
Fix:
35+
36+
- `import pwd` fix for windows.

leeteasy/__main__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import os
2-
import pwd
32
import time as clock
3+
from sys import platform
44

55
import click
66
import schedule
@@ -54,5 +54,9 @@ def execute_root():
5454
execute_root.add_command(execute_stop)
5555

5656
if __name__ == '__main__':
57-
os.environ['DBUS_SESSION_BUS_ADDRESS'] = f'unix:path=/run/user/{pwd.getpwuid(os.getuid()).pw_uid}/bus'
57+
if platform != 'win32':
58+
import pwd
59+
60+
os.environ[
61+
'DBUS_SESSION_BUS_ADDRESS'] = f'unix:path=/run/user/{pwd.getpwuid(os.getuid()).pw_uid}/bus' # NOQA: E501
5862
execute_root()

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = leeteasy
3-
version = 1.0.1
3+
version = 1.0.2
44
author = Sudipto Baral
55
author_email = [email protected]
66
description = Desktop notification of easy daily challenge of leetcode.

0 commit comments

Comments
 (0)