./Config: Remove unneeded code and handle ^D
This commit is contained in:
parent
47130005ae
commit
4d07bf5c59
8
Config
8
Config
|
@ -47,14 +47,12 @@ class Configure():
|
||||||
print("Please specify the maximum nickname length. This must be the same across")
|
print("Please specify the maximum nickname length. This must be the same across")
|
||||||
print("all servers in your network or you risk desyncs. The maximum is 50.")
|
print("all servers in your network or you risk desyncs. The maximum is 50.")
|
||||||
|
|
||||||
nicklen = 890234
|
nicklen = 0
|
||||||
nicklen_valid = False
|
nicklen_valid = False
|
||||||
while not nicklen_valid:
|
while not nicklen_valid:
|
||||||
try:
|
try:
|
||||||
nicklen = int(self.promptUser("Maximum nickname length?", "31"))
|
nicklen = int(self.promptUser("Maximum nickname length?", "31"))
|
||||||
if nicklen > 51 and nicklen != 890234:
|
if nicklen < 51:
|
||||||
nicklen_valid = False
|
|
||||||
else:
|
|
||||||
nicklen_valid = True
|
nicklen_valid = True
|
||||||
except ValueError:
|
except ValueError:
|
||||||
nicklen_valid = False
|
nicklen_valid = False
|
||||||
|
@ -95,7 +93,7 @@ system("clear")
|
||||||
c = Configure()
|
c = Configure()
|
||||||
try:
|
try:
|
||||||
c.go()
|
c.go()
|
||||||
except KeyboardInterrupt:
|
except (KeyboardInterrupt, EOFError):
|
||||||
print("\nInterrupted, exiting!")
|
print("\nInterrupted, exiting!")
|
||||||
|
|
||||||
# vim: set ts=4 sw=4 tw=0 et
|
# vim: set ts=4 sw=4 tw=0 et
|
||||||
|
|
Loading…
Reference in New Issue