Merge lp:~14-jeevan/wifix/wifix into lp:wifix

Proposed by Jeevan
Status: Needs review
Proposed branch: lp:~14-jeevan/wifix/wifix
Merge into: lp:wifix
Diff against target: 29 lines (+6/-6)
1 file modified
platforms.py (+6/-6)
To merge this branch: bzr merge lp:~14-jeevan/wifix/wifix
Reviewer Review Type Date Requested Status
Sam Dieck Approve
Review via email: mp+239591@code.launchpad.net

Description of the change

Implemented isroot() function in platform.py

To post a comment you must log in.
Revision history for this message
Sam Dieck (samd) :
review: Approve
lp:~14-jeevan/wifix/wifix updated
107. By Jeevan

Shortened has_display function

Revision history for this message
Jason Nikolas Pappas (blackknightiii) wrote :

*awesome+work!great+job!

Revision history for this message
Jason Nikolas Pappas (blackknightiii) wrote :

Hello? This is your friend in 760 area code North Palm Springs, Ca Jason Nikolas Pappas=emc³blackknight+apokalypse

Sent from Yahoo Mail on Android

Unmerged revisions

107. By Jeevan

Shortened has_display function

106. By Jeevan

Implemented isroot() in platforms.py

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'platforms.py'
2--- platforms.py 2010-08-21 03:48:27 +0000
3+++ platforms.py 2014-10-28 11:54:20 +0000
4@@ -72,8 +72,11 @@
5 Returns True if the current process is being executed with elevated
6 privileges, False otherwise.
7 """
8+ if commands.getoutput("whoami")=="root":
9+ return True;
10
11- raise NotImplementedError
12+ return False;
13+
14
15 def message(self, message):
16 """
17@@ -221,11 +224,8 @@
18 return os.system("zenity --question --text='" + message + "'") == 0
19
20 def has_display(self):
21- if (commands.getoutput('echo $DISPLAY') != ""):
22- return True
23- else:
24- return False
25-
26+ return commands.getoutput('echo $DISPLAY') != ""
27+
28 def execute(self, command):
29 return os.system(command)
30

Subscribers

People subscribed via source and target branches

to all changes: