am 09a0d98b: am 1d758c90: Merge "adb unittest: make test_sync properly cleanup after itself"

* commit '09a0d98bebce23f014ea11af002c1fafaf6b8065':
  adb unittest: make test_sync properly cleanup after itself
diff --git a/adb/test_device.py b/adb/test_device.py
index 4452eed..d033a01 100644
--- a/adb/test_device.py
+++ b/adb/test_device.py
@@ -499,7 +499,8 @@
             self.assertEqual(temp_file.checksum, dev_md5)
 
         self.device.shell(['rm', '-rf', self.DEVICE_TEMP_DIR])
-        shutil.rmtree(base_dir + self.DEVICE_TEMP_DIR)
+        if base_dir is not None:
+            shutil.rmtree(base_dir)
 
     def test_unicode_paths(self):
         """Ensure that we can support non-ASCII paths, even on Windows."""