Internet radio browser GUI for music/video streams from various directory services.

⌈⌋ ⎇ branch:  streamtuner2


Check-in [84f2995f8d]

Overview
Comment:Format exceptions log.() calls
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 84f2995f8de8d7adc9fbfbea430132ec39453d73
User & Date: mario on 2020-05-13 17:45:09
Other Links: manifest | tags
Context
2020-05-13
17:45
Dirble is not coming back. check-in: f0c0fe2cc6 user: mario tags: trunk
17:45
Format exceptions log.() calls check-in: 84f2995f8d user: mario tags: trunk
17:44
Add channel icon above title/link in toolbar. check-in: 614c2f6690 user: mario tags: trunk
Changes

Modified config.py from [833278b4e6] to [0fccb051e3].

37
38
39
40
41
42
43

44
45
46
47
48
49
50
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51







+







# Also provides a simple logging interface with log.TYPE(...),
# which is also pre-instantiated.


from __future__ import print_function
import os, glob
import sys
from traceback import format_exc
import json
import gzip
import platform
import re
from compat2and3 import gzip_decode, find_executable, PY2, PY3
import zlib
import zipfile
135
136
137
138
139
140
141
142

143
144
145
146
147
148
149
136
137
138
139
140
141
142

143
144
145
146
147
148
149
150







-
+







            "bookmarks": 1,
            "search": 1,
            "streamedit": 1,
            "configwin": 1,
        }
        self.tmp = os.environ.get("TEMP", "/tmp") + "/streamtuner2"
        self.nothreads = 0
        self.max_streams = "500"
        self.max_streams = 500
        self.internetradio_max_pages = 5
        self.show_bookmarks = 1
        self.show_favicons = 1
        self.load_favicon = 1
        self.heuristic_bookmark_update = 0
        self.retain_deleted = 0
        self.auto_save_appstate = 1
370
371
372
373
374
375
376

377





378
379
380
381
382
383
384
371
372
373
374
375
376
377
378

379
380
381
382
383
384
385
386
387
388
389
390







+
-
+
+
+
+
+







                return
        # color/prefix
        if conf.windows:
            method = "[%s]" % method
        else:
            method = r"[{}[{}]".format(self.colors.get(method.split("_")[0], "47m"), method)
        # output
        print(
        print(method + " " + " ".join([str(a) for a in args]), file=sys.stderr)
            method + " " + " " . join(
                format_exc(a) if isinstance(a, Exception) else str(a) for a in args
            ),
            file=sys.stderr
        )

    # Colors
    colors = {
        "ERR":  "31m",          # red    ERROR
        "INIT": "38;5;196m",    # red    INIT ERROR
        "WARN": "38;5;208m",    # orange WARNING
        "EXEC": "38;5;66m",     # green  EXEC