[projects/git-slug: 103/170] Use argument value of runwatch to define uid and gid

glen glen at pld-linux.org
Mon Sep 21 21:47:28 CEST 2015


commit 2087fc3da3c50c0f710527aa276524c2dd9c5e3e
Author: Kacper Kornet <draenog at pld-linux.org>
Date:   Wed Mar 21 05:57:31 2012 +0000

    Use argument value of runwatch to define uid and gid

 slug_watch | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/slug_watch b/slug_watch
index 726145a..90699b7 100755
--- a/slug_watch
+++ b/slug_watch
@@ -80,9 +80,9 @@ class EventHandler(pyinotify.ProcessEvent):
         process_file(event.pathname)
 
 def runwatch(user=None):
-    if options.user is not None:
-        uid = pwd.getpwnam(options.user).pw_uid
-        gid = pwd.getpwnam(options.user).pw_gid
+    if user is not None:
+        uid = pwd.getpwnam(user).pw_uid
+        gid = pwd.getpwnam(user).pw_gid
         os.setgid(gid)
         os.setuid(uid)
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/git-slug.git/commitdiff/4ed64f73960519a2f4fd04c42950b2c96ae795c5



More information about the pld-cvs-commit mailing list