eric6/E5XML/DebuggerPropertiesReader.py

Sun, 02 Feb 2020 11:04:32 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 02 Feb 2020 11:04:32 +0100
changeset 7380
c99320e859ca
parent 7360
9190402e4505
child 7780
41420f82c0ac
permissions
-rw-r--r--

Fixed an issue related to showing the application name in the menu bar of Gnome desktop under Wayland.

607
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
7360
9190402e4505 Updated copyright for 2020.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7253
diff changeset
3 # Copyright (c) 2010 - 2020 Detlev Offenbach <detlev@die-offenbachs.de>
607
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
2992
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
7 Module implementing a class for reading an XML project debugger properties
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
8 file.
607
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9 """
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
11
607
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12 from .Config import debuggerPropertiesFileFormatVersion
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13 from .XMLStreamReaderBase import XMLStreamReaderBase
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
15
607
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16 class DebuggerPropertiesReader(XMLStreamReaderBase):
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 """
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 Class for reading an XML project debugger properties file.
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 """
6352
4bdc6503df81 Continued to remove all explicit references to Python interpreters and replace them by references to virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
20 supportedVersions = ["3.9", "6.0"]
607
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 def __init__(self, device, project):
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 """
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 Constructor
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 @param device reference to the I/O device to read from (QIODevice)
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 @param project Reference to the project object to store the
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 information into.
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 """
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 XMLStreamReaderBase.__init__(self, device)
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 self.project = project
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34 self.version = ""
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
36 def readXML(self, quiet=False):
607
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 """
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38 Public method to read and parse the XML document.
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 @param quiet flag indicating quiet operations.
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 If this flag is true, no errors are reported.
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42 """
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
43 while not self.atEnd():
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 self.readNext()
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
45 if self.isStartElement():
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
46 if self.name() == "DebuggerProperties":
2992
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
47 self.version = self.attribute(
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
48 "version", debuggerPropertiesFileFormatVersion)
607
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
49 if self.version not in self.supportedVersions:
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50 self.raiseUnsupportedFormatVersion(self.version)
6352
4bdc6503df81 Continued to remove all explicit references to Python interpreters and replace them by references to virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
51 elif self.name() == "VirtualEnv":
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
52 self.project.debugProperties["VIRTUALENV"] = (
6352
4bdc6503df81 Continued to remove all explicit references to Python interpreters and replace them by references to virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
53 self.readElementText()
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
54 )
607
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
55 elif self.name() == "Interpreter":
6352
4bdc6503df81 Continued to remove all explicit references to Python interpreters and replace them by references to virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
56 # just read this obsolete entry and ignore it
4bdc6503df81 Continued to remove all explicit references to Python interpreters and replace them by references to virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
57 self.readElementText()
607
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
58 elif self.name() == "DebugClient":
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
59 self.project.debugProperties["DEBUGCLIENT"] = (
2992
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
60 self.readElementText()
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
61 )
607
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
62 elif self.name() == "Environment":
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
63 self.project.debugProperties["ENVIRONMENTOVERRIDE"] = (
607
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
64 int(self.attribute("override", "0"))
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
65 )
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
66 self.project.debugProperties["ENVIRONMENTSTRING"] = (
607
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
67 self.readElementText()
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
68 )
607
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
69 elif self.name() == "RemoteDebugger":
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
70 self.__readRemoteDebugger()
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
71 elif self.name() == "PathTranslation":
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
72 self.__readPathTranslation()
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
73 elif self.name() == "ConsoleDebugger":
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
74 self.project.debugProperties["CONSOLEDEBUGGER"] = (
607
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
75 int(self.attribute("on", "0"))
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
76 )
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
77 self.project.debugProperties["CONSOLECOMMAND"] = (
607
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
78 self.readElementText()
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
79 )
607
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
80 elif self.name() == "Redirect":
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
81 self.project.debugProperties["REDIRECT"] = (
607
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
82 int(self.attribute("on", "1"))
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
83 )
607
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
84 elif self.name() == "Noencoding":
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
85 self.project.debugProperties["NOENCODING"] = (
607
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
86 int(self.attribute("on", "0"))
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
87 )
607
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
88 else:
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89 self.raiseUnexpectedStartTag(self.name())
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
90
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
91 if not quiet:
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
92 self.showErrorMessage()
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
93
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
94 def __readRemoteDebugger(self):
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
95 """
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
96 Private method to read the remote debugger info.
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
97 """
2992
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
98 self.project.debugProperties["REMOTEDEBUGGER"] = int(self.attribute(
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
99 "on", "0"))
607
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
100
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
101 while not self.atEnd():
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
102 self.readNext()
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
103 if self.isEndElement() and self.name() == "RemoteDebugger":
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
104 break
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
105
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
106 if self.isStartElement():
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
107 if self.name() == "RemoteHost":
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
108 self.project.debugProperties["REMOTEHOST"] = (
2992
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
109 self.readElementText()
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
110 )
607
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
111 elif self.name() == "RemoteCommand":
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
112 self.project.debugProperties["REMOTECOMMAND"] = (
2992
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
113 self.readElementText()
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
114 )
607
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
115 else:
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
116 self.raiseUnexpectedStartTag(self.name())
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
117
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
118 def __readPathTranslation(self):
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
119 """
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
120 Private method to read the path translation info.
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
121 """
2992
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
122 self.project.debugProperties["PATHTRANSLATION"] = int(self.attribute(
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
123 "on", "0"))
607
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
124
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
125 while not self.atEnd():
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
126 self.readNext()
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
127 if self.isEndElement() and self.name() == "PathTranslation":
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
128 break
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
129
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
130 if self.isStartElement():
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
131 if self.name() == "RemotePath":
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
132 self.project.debugProperties["REMOTEPATH"] = (
2992
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
133 self.readElementText()
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
134 )
607
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
135 elif self.name() == "LocalPath":
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
136 self.project.debugProperties["LOCALPATH"] = (
2992
dbdf27746da5 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
137 self.readElementText()
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
138 )
607
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
139 else:
d95d60ba16aa Migrated project debugger properties handler to project debugger properties reader/writer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
140 self.raiseUnexpectedStartTag(self.name())

eric ide

mercurial