metadata

Check-in [66fdae2f43]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Handle null values; treat as non-existent
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:66fdae2f43d5a185090c946927bfd95d1ab312fd97cfb2f91d4afbecb588fa58
User & Date: vandys 2018-06-24 21:32:04
Context
2018-06-26
21:40
Deal with root URL path Leaf check-in: 542492a693 user: vandys tags: trunk
2018-06-24
21:32
Handle null values; treat as non-existent check-in: 66fdae2f43 user: vandys tags: trunk
21:31
Normalize station symbols check-in: d362b2ab54 user: vandys tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to stream.py.

188
189
190
191
192
193
194

195
196
197
198
199
200
201
202
		idx = p.index('=')
		k = p[:idx].strip(Whitespace)
		v = p[idx+1:].strip(Whitespace)
		if v[0] == "'":
		    v = v[1:]
		    if v[-1] == "'":
			v = v[:-1]

		res[k] = v
	    
	    if not res:
		sys.stderr.write("%s no usable metadata\n" % (self.host,))
		continue

	    # Convert to a JSON string
	    res["err"] = None







>
|







188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
		idx = p.index('=')
		k = p[:idx].strip(Whitespace)
		v = p[idx+1:].strip(Whitespace)
		if v[0] == "'":
		    v = v[1:]
		    if v[-1] == "'":
			v = v[:-1]
		if k and v:
		    res[k] = v
	    
	    if not res:
		sys.stderr.write("%s no usable metadata\n" % (self.host,))
		continue

	    # Convert to a JSON string
	    res["err"] = None