commit dde0552055d5cb164b4eacc88adedebfc4d3dd60
Author: dsorber <david.sorber@gmail.com>
Date:   Sun Feb 11 09:42:20 2018 -0500

    Minor improvements to cleanup and open the password dialog automagically at start.

diff --git a/software/pwmgr/pwmgr.py b/software/pwmgr/pwmgr.py
index 39ff16f..bb9fa38 100755
--- a/software/pwmgr/pwmgr.py
+++ b/software/pwmgr/pwmgr.py
@@ -19,7 +19,7 @@ SCRATCH_FILE_PATH = '/mnt/pw_ramdisk/chicken_soup.txt'
 ENC_TMP_FILE_PATH = '/home/dsorber/Documents/chicken_soup.enc.tmp'
 KEY_FILE_PATH = '/mnt/pw_ramdisk/.f05d11ef-000c-45c2-ae14-56b56c23e1c5'
 
-VERSION = '0.0.5'
+VERSION = '0.0.6'
 
 class SearchDialog(Gtk.Dialog):
 
@@ -147,8 +147,7 @@ class TextViewWindow(Gtk.Window):
         self.create_textview()
         self.create_toolbar()
         self.create_bottom()
-        self.connect("key-press-event", self._key_press_event)        
-        
+        self.connect("key-press-event", self._key_press_event)
         
         self.mounted = False
         self.pass_data_loaded = False
@@ -156,6 +155,10 @@ class TextViewWindow(Gtk.Window):
         self.original_hash = None
         self.pbar_win = None
         self.should_quit = False
+
+        # Open password prompt window at start
+        GLib.idle_add(self.open_pwd_file, self.grid)
+        
     
     def async_quit(self):        
         if self.should_quit:
@@ -332,8 +335,12 @@ class TextViewWindow(Gtk.Window):
     
     def _remove_mount_files(self):
         # Remove files in the mount path
-        for file_ in glob.glob('{:s}/*'.format(MOUNT_PATH)):
-            os.remove(file_)
+        for file_object in os.listdir(MOUNT_PATH):
+            file_object_path = os.path.join(MOUNT_PATH, file_object)
+            if os.path.isfile(file_object_path):
+                os.unlink(file_object_path)
+            else:
+                shutil.rmtree(file_object_path)
     
     def _hash_textview(self):
         passwd_text = self.textbuffer.get_text(self.textbuffer.get_start_iter(),
@@ -402,7 +409,7 @@ class TextViewWindow(Gtk.Window):
         
         if self.mounted:
             # Start async polling of the quit flag
-            GLib.idle_add(self.async_quit)
+            GLib.timeout_add(500, self.async_quit)
         
             # Create the progress window
             self.pbar_win = ProgressBarWindow(self, 'Closing...')
