Skip to content

Commit

Permalink
version 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
acolomba committed Feb 2, 2019
1 parent b3eb573 commit f15be09
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions blackvuesync.py
Expand Up @@ -15,7 +15,7 @@
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

__version__ = "1.0"
__version__ = "1.1"

import argparse
import datetime
Expand Down Expand Up @@ -184,9 +184,9 @@ def download_file(base_url, filename, destination):
if not dry_run:
try:
url = urllib.parse.urljoin(base_url, "Record/%s" % filename)
urllib.request.urlretrieve(url, temp_filepath)
os.rename(temp_filepath, filepath)
logger.debug("Downloaded file : %s", filename)
urllib.request.urlretrieve(url, temp_filepath)
os.rename(temp_filepath, filepath)
logger.debug("Downloaded file : %s", filename)
except urllib.error.URLError as e:
raise UserWarning("Cannot communicate with dashcam at address : %s; error : %s" % (base_url, e))
else:
Expand Down

0 comments on commit f15be09

Please sign in to comment.