mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-12 11:20:09 +00:00
Fix using the console in Windows, but only in command-line mode
This commit is contained in:
parent
429f7064fa
commit
3c703d2ef7
4 changed files with 16 additions and 4 deletions
|
@ -15,6 +15,9 @@
|
||||||
* Fix crash in Windows when creating a torrent
|
* Fix crash in Windows when creating a torrent
|
||||||
* Add button to Other preferences to associate magnet links with Deluge
|
* Add button to Other preferences to associate magnet links with Deluge
|
||||||
|
|
||||||
|
==== Console ====
|
||||||
|
* Fix using the console in Windows, but only in command-line mode
|
||||||
|
|
||||||
==== Label ====
|
==== Label ====
|
||||||
* Fix #1085 only use ints for specific options to prevent unhandled exception
|
* Fix #1085 only use ints for specific options to prevent unhandled exception
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,10 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
import curses
|
try:
|
||||||
|
import curses
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
|
||||||
colors = [
|
colors = [
|
||||||
'COLOR_BLACK',
|
'COLOR_BLACK',
|
||||||
|
|
|
@ -185,11 +185,14 @@ class ConsoleUI(component.Component):
|
||||||
d.addCallback(on_connect)
|
d.addCallback(on_connect)
|
||||||
|
|
||||||
self.coreconfig = CoreConfig()
|
self.coreconfig = CoreConfig()
|
||||||
if self.interactive:
|
if self.interactive and not deluge.common.windows_check():
|
||||||
# We use the curses.wrapper function to prevent the console from getting
|
# We use the curses.wrapper function to prevent the console from getting
|
||||||
# messed up if an uncaught exception is experienced.
|
# messed up if an uncaught exception is experienced.
|
||||||
import curses.wrapper
|
import curses.wrapper
|
||||||
curses.wrapper(self.run)
|
curses.wrapper(self.run)
|
||||||
|
elif self.interactive and deluge.common.windows_check():
|
||||||
|
print "You cannot run the deluge-console in interactive mode in Windows.\
|
||||||
|
Please use commands from the command line, eg: deluge-console config;help;exit"
|
||||||
else:
|
else:
|
||||||
reactor.run()
|
reactor.run()
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,10 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import curses
|
try:
|
||||||
|
import curses
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
import colors
|
import colors
|
||||||
try:
|
try:
|
||||||
import signal
|
import signal
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue