From 51483d757ea3bfd4d065e6d3379d022d9668cfba Mon Sep 17 00:00:00 2001 From: Lance Allen Date: Fri, 12 Jun 2015 16:21:12 -0700 Subject: [PATCH] changing the hardcoded personal directory for path.expanduser --- removeFinishedTorrents.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/removeFinishedTorrents.py b/removeFinishedTorrents.py index a72f6f4..12be444 100644 --- a/removeFinishedTorrents.py +++ b/removeFinishedTorrents.py @@ -16,12 +16,16 @@ import transmissionrpc import pushbullet import requests from time import sleep +from os import path + +# Put your API key into a text file +apifile = path.expanduser('~/pb_api.txt') # Get rid of the SSL warnings requests.packages.urllib3.disable_warnings() # Grab Pushbullet API -with open('/home/lance/pb_api.txt', 'rb') as file: +with open(apifile, 'rb') as file: api = file.read().strip() ##################################################