]> git.phdru.name Git - xsetbg.git/blobdiff - print-filename.py
Style: Fix `flake8` error F821 undefined name 'error'
[xsetbg.git] / print-filename.py
index 518ab21af9c86460ce0ab9eca73e2c19a8e28777..921f129bbed512d21e1e6a229623e2bead4e6237 100755 (executable)
@@ -1,17 +1,12 @@
 #! /usr/bin/env python
-"""Print background filename
+"""print(background filename)
 
-Print the filename of the current or previous background image.
+print(the filename of the current or previous background image.)
 
 This file is a part of XSetBg.
 
 """
 
-__author__ = "Oleg Broytman <phd@phdru.name>"
-__copyright__ = "Copyright (C) 2004-2015 PhiloSoft Design"
-__license__ = "GNU GPL"
-
-
 import sys
 from xsetbg_db import xsetbg_db
 
@@ -58,9 +53,9 @@ def get_args():
         output_encoding = default_encoding
     return index, output_encoding
 
-index, output_encoding = get_args()
 
+index, output_encoding = get_args()
 filename = xsetbg_db.select('last_shown IS NOT NULL',
                             orderBy='-last_shown')[index].full_name
 
-print filename.encode(output_encoding)
+print(filename.encode(output_encoding))