Merge "sync: assign manifest_name earlier"
diff --git a/subcmds/sync.py b/subcmds/sync.py
index c7f02b3..002d05f 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -487,6 +487,8 @@
     if opt.manifest_name:
       self.manifest.Override(opt.manifest_name)
 
+    manifest_name = opt.manifest_name
+
     if opt.smart_sync or opt.smart_tag:
       if not self.manifest.manifest_server:
         print('error: cannot smart sync: no manifest server defined in '
@@ -526,7 +528,6 @@
                                                     (username, password),
                                                     1)
 
-      manifest_name = opt.manifest_name
       try:
         server = xmlrpc.client.Server(manifest_server)
         if opt.smart_sync: