summaryrefslogtreecommitdiffstats
path: root/iw
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2005-04-27 20:34:04 +0000
committerJeremy Katz <katzj@redhat.com>2005-04-27 20:34:04 +0000
commitd14c4b4a431e0b528cc0b3bdd72b6454c36bd04a (patch)
treea67b0089402c9ea73267e1a4a075136ede1f1d7d /iw
parentb49f685e37333985100737be4d5c7a647c937afd (diff)
downloadanaconda-d14c4b4a431e0b528cc0b3bdd72b6454c36bd04a.tar.gz
anaconda-d14c4b4a431e0b528cc0b3bdd72b6454c36bd04a.tar.xz
anaconda-d14c4b4a431e0b528cc0b3bdd72b6454c36bd04a.zip
2005-04-27 Jeremy Katz <katzj@redhat.com>
* iutil.py (writeRpmPlatform): patch from Joe Pruett to improve rpmarch= support (#101971) * iw/ipwidget.py (IPEditor.dehydrate): Make sure people get decimal IP addrs. (#122038)
Diffstat (limited to 'iw')
-rw-r--r--iw/ipwidget.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/iw/ipwidget.py b/iw/ipwidget.py
index f64055991..a0d70bffd 100644
--- a/iw/ipwidget.py
+++ b/iw/ipwidget.py
@@ -103,7 +103,17 @@ class IPEditor:
except ValueError, msg:
raise IPError, (_("IP Addresses must contain numbers between 0 and 255"), widget)
- return self.entrys['entry1'].get_text() + "." + self.entrys['entry2'].get_text() + "." +self.entrys['entry3'].get_text() + "." +self.entrys['entry4'].get_text()
+ ents = []
+ for ent in (self.entrys['entry1'].get_text(),
+ self.entrys['entry2'].get_text(),
+ self.entrys['entry3'].get_text(),
+ self.entrys['entry4'].get_text()):
+ if ent != "0":
+ ents.append(ent.lstrip("0"))
+ else:
+ ents.append(ent)
+
+ return "%s.%s.%s.%s" %(ents[0], ents[1], ents[2], ents[3])
def entry_insert_text_cb(self, entry, text, length, pos, next):
if text == '.':