eric6/PipInterface/PipPackageDetailsDialog.py

changeset 8228
772103b14c18
parent 8222
5994b80b8760
child 8259
2bbec88047dd
equal deleted inserted replaced
8227:349308e84eeb 8228:772103b14c18
185 @param forUrl flag indicating to sanitize an URL text 185 @param forUrl flag indicating to sanitize an URL text
186 @type bool 186 @type bool
187 @return processed text 187 @return processed text
188 @rtype str 188 @rtype str
189 """ 189 """
190 if text == "UNKNOWN": 190 if text == "UNKNOWN" or text is None:
191 text = "" 191 text = ""
192 elif text == "any": 192 elif text == "any":
193 text = self.tr("any") 193 text = self.tr("any")
194 elif text is None:
195 text = ""
196 if forUrl and ( 194 if forUrl and (
197 not isinstance(text, str) or 195 not isinstance(text, str) or
198 not text.startswith(("http://", "https://", "ftp://")) 196 not text.startswith(("http://", "https://", "ftp://"))
199 ): 197 ):
200 # ignore if the schema is not one of the listed ones 198 # ignore if the schema is not one of the listed ones

eric ide

mercurial