Index: build/android/pylib/instrumentation/instrumentation_test_instance.py |
diff --git a/build/android/pylib/instrumentation/instrumentation_test_instance.py b/build/android/pylib/instrumentation/instrumentation_test_instance.py |
index d01e36eeeee8a84eba18096a487f0a75eb4ac678..d8f0995269327ff03c4407424f3b5c37fb86d0a1 100644 |
--- a/build/android/pylib/instrumentation/instrumentation_test_instance.py |
+++ b/build/android/pylib/instrumentation/instrumentation_test_instance.py |
@@ -685,7 +685,7 @@ class InstrumentationTestInstance(test_instance.TestInstance): |
self._should_save_logcat = bool(args.json_results_file) |
def _initializeEditPrefsAttributes(self, args): |
- if not hasattr(args, 'shared_prefs_file'): |
+ if not hasattr(args, 'shared_prefs_file') or not args.shared_prefs_file: |
return |
if not isinstance(args.shared_prefs_file, str): |
logging.warning("Given non-string for a filepath") |