From: Nick Piacentine <npi...@mars.asu.edu>
---
client/tools/rhncfg/config_common/transactions.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/client/tools/rhncfg/config_common/transactions.py
b/client/tools/rhncfg/config_common/transactions.py
index 43758f7..db12306 100644
--- a/client/tools/rhncfg/config_common/transactions.py
+++ b/client/tools/rhncfg/config_common/transactions.py
@@ -126,6 +126,10 @@ class DeployTransaction:
try:
user_record = pwd.getpwnam(file_info['username'])
except Exception, e:
+ #Check if username is an int
+ try:
+ user_record = [None, None,
int(file_info['username'])]
+ except ValueError:
raise
cfg_exceptions.UserNotFound(file_info['username']), None, sys.exc_info()[2]
uid = user_record[2]
@@ -140,6 +144,10 @@ class DeployTransaction:
try:
group_record = grp.getgrnam(file_info['groupname'])
except Exception, e:
+ #Check if groupname is an int
+ try:
+ group_record = [None, None,
int(file_info['groupname'])]
+ except ValueError:
raise
cfg_exceptions.GroupNotFound(file_info['groupname']), None, sys.exc_info()[2]
gid = group_record[2]
--
1.7.11.3
_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel