Check-in [8e8ad5dfeb]
Overview
Comment: | Open json/config files in text mode |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | py3 |
Files: | files | file ages | folders |
SHA1: |
8e8ad5dfeb100c6bf34f5592f860baa5 |
User & Date: | mario on 2014-04-11 02:54:16 |
Other Links: | branch diff | manifest | tags |
Context
2014-04-11
| ||
22:22 | Fixed syntax error in deleted_streams diff check-in: 4b78a4eba1 user: mario tags: py3 | |
02:54 | Open json/config files in text mode check-in: 8e8ad5dfeb user: mario tags: py3 | |
02:53 | use compat2and3.urllib functions check-in: f56be1b41d user: mario tags: py3 | |
Changes
Modified config.py from [4880b97351] to [9c4bf2dcba].
︙ | |||
121 122 123 124 125 126 127 | 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | - + | if (not os.path.exists(self.dir)): os.makedirs(self.dir) # store some configuration list/dict into a file def save(self, name="settings", data=None, gz=0, nice=0): name = name + ".json" |
︙ | |||
152 153 154 155 156 157 158 | 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | - + - + - + | # retrieve data from config file def load(self, name): name = name + ".json" file = self.dir + "/" + name try: # .gz or normal file if os.path.exists(file + ".gz"): |
︙ |
Modified st2.py from [858158ce9f] to [767c1a69b3].
︙ | |||
28 29 30 31 32 33 34 35 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | + - + - - - - - - - - | # # """ project status """ # # The application runs mostly stable. The GUI interfaces are workable. # It's supposed to run on Gtk2 and Gtk3. Python3 support is still WIP. # There haven't been any optimizations regarding memory usage and |
︙ | |||
64 65 66 67 68 69 70 | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | - - - - - | # to read the config data -> limited risk, since it's only local files # - HIGH RISK: no verification of downloaded favicon image files (ico/png), # as they are passed to gtk.gdk.Pixbuf (OTOH data pre-filtered by Google) # - MEDIUM: audio players / decoders are easily affected by buffer overflows # from corrupt mp3/stream data, and streamtuner2 executes them # - but since that's the purpose -> no workaround # |
︙ |