Check-in [0943cca27e]
Overview
| Comment: | More customized log categories/colorization. |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
0943cca27ee4a1a03a84f6537592e8bd |
| User & Date: | mario on 2015-04-26 15:34:37 |
| Other Links: | manifest | tags |
Context
|
2015-04-26
| ||
| 15:35 | Cover most catched exceptions with log messages. check-in: 363dce5eb9 user: mario tags: trunk | |
| 15:34 | More customized log categories/colorization. check-in: 0943cca27e user: mario tags: trunk | |
| 15:34 | Add custom pls extractor (for unordered playlist entries), keep regex method as fallback. More logging. check-in: 0725d3fbc8 user: mario tags: trunk | |
Changes
Modified config.py from [ae59bddda4] to [7f53cc759c].
| ︙ | |||
188 189 190 191 192 193 194 | 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 | - + + + + + + + - + - |
# check for subdir
if (name.find("/") > 0):
subdir = name[0:name.find("/")]
subdir = self.dir + "/" + subdir
if (not os.path.exists(subdir)):
os.mkdir(subdir)
open(subdir+"/.nobackup", "w").close()
|
| ︙ | |||
265 266 267 268 269 270 271 | 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 | - + |
try:
from netrc import netrc as parser
try:
netrc = parser().hosts
except:
netrc = parser(self.xdg() + "/netrc").hosts
except:
|
| ︙ | |||
351 352 353 354 355 356 357 | 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | - + |
if gz:
bin = gzip_decode(bin)
if decode:
return bin.decode("utf-8", errors='ignore')
else:
return str(bin)
except:
|
| ︙ | |||
380 381 382 383 384 385 386 | 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 | - + |
#
def plugin_meta(fn=None, src=None, module=None, frame=1, plugin_base="channels"):
# try via pkgutil first
if module:
fn = module
try: src = pkgutil.get_data(plugin_base, fn+".py")
|
| ︙ | |||
494 495 496 497 498 499 500 | 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 | - - - - - - + + + + + + + + + + - - - - + + + + |
# color/prefix
method = r"[{}[{}][0m".format(self.colors.get(method.split("_")[0], "47m"), method)
# output
print(method + " " + " ".join([str(a) for a in args]), file=sys.stderr)
# Colors
colors = {
|