diff options
author | cedricbonhomme <devnull@localhost> | 2012-05-01 18:37:52 +0200 |
---|---|---|
committer | cedricbonhomme <devnull@localhost> | 2012-05-01 18:37:52 +0200 |
commit | 15a0cb06132587fd69afd0e405b6c9b8672f4db7 (patch) | |
tree | 4e7c29c6a5bfa35faed55a0e609a030ef96a62b1 /source | |
parent | It is now possible to update information about a feed with the MongoDG database. (diff) | |
download | newspipe-15a0cb06132587fd69afd0e405b6c9b8672f4db7.tar.gz newspipe-15a0cb06132587fd69afd0e405b6c9b8672f4db7.tar.bz2 newspipe-15a0cb06132587fd69afd0e405b6c9b8672f4db7.zip |
Improved change_feed_url() function.
Diffstat (limited to 'source')
-rwxr-xr-x | source/utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/utils.py b/source/utils.py index 26492b8d..a4506d07 100755 --- a/source/utils.py +++ b/source/utils.py @@ -244,8 +244,9 @@ def change_feed_url(old_feed_url, new_feed_url): # Replace the URL in the text file with open("./var/feed.lst", "r") as f: lines = f.readlines() + lines = map(str.strip, lines) try: - lines[lines.index(old_feed_url+"\n")] = new_feed_url + '\n' + lines[lines.index(old_feed_url)] = new_feed_url except: return with open("./var/feed.lst", "w") as f: |