Browse code

Removed debug messages, make sure default index is defined

Josep del Rio authored on 2012/04/19 05:37:10
Showing 1 changed files
... ...
@@ -427,20 +427,17 @@ class CloudFront(object):
427 427
         # joseprio: if the user doesn't want to invalidate the default index
428 428
         # path, or if the user wants to invalidate the root of the default
429 429
         # index, we need to process those paths
430
-        if not invalidate_default_index_on_cf or invalidate_default_index_root_on_cf:
430
+        if default_index_file is not None and (not invalidate_default_index_on_cf or invalidate_default_index_root_on_cf):
431 431
             new_paths = []
432 432
             default_index_suffix = '/' + default_index_file
433 433
             for path in paths:
434 434
                 if path.endswith(default_index_suffix) or path ==  default_index_file:
435 435
                     if invalidate_default_index_on_cf:
436 436
                         new_paths.append(path)
437
-                        output('Appending ' + path)
438 437
                     if invalidate_default_index_root_on_cf:
439 438
                         new_paths.append(path[:-len(default_index_file)])
440
-                        output('Appending ' + path[:-len(default_index_file)])
441 439
                 else:
442 440
                     new_paths.append(path)
443
-                    output('Appending ' + path)
444 441
             paths = new_paths
445 442
         
446 443
         # uri could be either cf:// or s3:// uri