[libhttpseverywhere] updater: fix unreachable catch clause



commit 880b3a133cc74fcae4fbcaac47672a9a0cba97b1
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Tue Nov 22 09:53:12 2016 -0600

    updater: fix unreachable catch clause
    
    This function does not throw

 src/update.vala |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)
---
diff --git a/src/update.vala b/src/update.vala
index 705cd93..3e1cb5e 100644
--- a/src/update.vala
+++ b/src/update.vala
@@ -97,13 +97,7 @@ namespace HTTPSEverywhere {
          */
         private void lock_update() throws UpdateError {
             var file = File.new_for_path(Path.build_filename(UPDATE_DIR, LOCK_NAME));
-            var lockfile_exists = false;
-            try {
-                lockfile_exists = file.query_exists();
-            } catch (Error e ) {
-                throw new UpdateError.WRITE_FAILED("Error querying lock file: %s".printf(e.message));
-            }
-            if (lockfile_exists) {
+            if (file.query_exists()) {
                 try {
                     var info = file.query_info("*", FileQueryInfoFlags.NONE);
                     DateTime modification_time = new 
GLib.DateTime.from_timeval_local(info.get_modification_time());


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]