Mercurial > hg > egg-tcls
comparison fetch_feeds.tcl @ 661:721c8cef5039
fetch_feeds: Clean up some comments.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 19 Feb 2021 21:06:20 +0200 |
parents | ab2ba0b82407 |
children |
comparison
equal
deleted
inserted
replaced
660:ab2ba0b82407 | 661:721c8cef5039 |
---|---|
234 | 234 |
235 | 235 |
236 | 236 |
237 | 237 |
238 ############################################################################## | 238 ############################################################################## |
239 ### Open database, etc | 239 ### |
240 ############################################################################## | 240 ### Main code starts |
241 ### | |
242 ############################################################################## | |
243 ### Set up HTTP stuff | |
241 if {[info exists http_user_agent] && $http_user_agent != ""} { | 244 if {[info exists http_user_agent] && $http_user_agent != ""} { |
242 ::http::config -urlencoding utf8 -useragent $http_user_agent | 245 ::http::config -urlencoding utf8 -useragent $http_user_agent |
243 } else { | 246 } else { |
244 ::http::config -urlencoding utf8 -useragent "Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0" | 247 ::http::config -urlencoding utf8 -useragent "Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0" |
245 } | 248 } |
251 if {[info exists http_tls_support] && $http_tls_support != 0} { | 254 if {[info exists http_tls_support] && $http_tls_support != 0} { |
252 package require tls | 255 package require tls |
253 ::http::register https 443 [list ::tls::socket -request true -require true -ssl2 false -ssl3 false -tls1 true -tls1.1 true -tls1.2 true -cadir $http_tls_cadir -autoservername true] | 256 ::http::register https 443 [list ::tls::socket -request true -require true -ssl2 false -ssl3 false -tls1 true -tls1.1 true -tls1.2 true -cadir $http_tls_cadir -autoservername true] |
254 } | 257 } |
255 | 258 |
256 | 259 ### Open database |
257 | |
258 set nitems 0 | 260 set nitems 0 |
259 set currclock [clock seconds] | 261 set currclock [clock seconds] |
260 global feeds_db | 262 global feeds_db |
261 if {[catch {sqlite3 feeds_db $feeds_db_file} uerrmsg]} { | 263 if {[catch {sqlite3 feeds_db $feeds_db_file} uerrmsg]} { |
262 puts "Could not open SQLite3 database '${feeds_db_file}': ${uerrmsg}" | 264 puts "Could not open SQLite3 database '${feeds_db_file}': ${uerrmsg}" |