~ubuntu-branches/ubuntu/trusty/swift/trusty-updates

« back to all changes in this revision

Viewing changes to bin/swift-ring-builder

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Soren Hansen, Chuck Short
  • Date: 2012-09-07 19:02:36 UTC
  • mfrom: (1.2.12)
  • Revision ID: package-import@ubuntu.com-20120907190236-fqrmbzm7v6zivs8d
Tags: 1.7.0-0ubuntu1
[ Soren Hansen ]
* Update debian/watch to account for symbolically named tarballs and
  use newer URL.
* Run unit tests at build time.
* Fix Launchpad URLs in debian/watch.

[ Chuck Short ]
* New upstream release
* debian/control: Add pubthon-moc as a build dep
* debian/rules: Dont fail if testsuite fails.

Show diffs side-by-side

added added

removed removed

Lines of Context:
610
610
            print '-' * 79
611
611
            status = EXIT_WARNING
612
612
        ts = time()
613
 
        pickle.dump(builder.get_ring().to_dict(),
614
 
                    GzipFile(pathjoin(backup_dir, '%d.' % ts +
615
 
                        basename(ring_file)), 'wb'), protocol=2)
 
613
        builder.get_ring().save(
 
614
            pathjoin(backup_dir, '%d.' % ts + basename(ring_file)))
616
615
        pickle.dump(builder.to_dict(), open(pathjoin(backup_dir,
617
616
            '%d.' % ts + basename(argv[1])), 'wb'), protocol=2)
618
 
        pickle.dump(builder.get_ring().to_dict(), GzipFile(ring_file, 'wb'),
619
 
                    protocol=2)
 
617
        builder.get_ring().save(ring_file)
620
618
        pickle.dump(builder.to_dict(), open(argv[1], 'wb'), protocol=2)
621
619
        exit(status)
622
620
 
644
642
                      '"rebalance"?'
645
643
            else:
646
644
                print 'Warning: Writing an empty ring'
647
 
        pickle.dump(ring_data.to_dict(),
648
 
                    GzipFile(pathjoin(backup_dir, '%d.' % time() +
649
 
                        basename(ring_file)), 'wb'), protocol=2)
650
 
        pickle.dump(ring_data.to_dict(), GzipFile(ring_file, 'wb'), protocol=2)
 
645
        ring_data.save(
 
646
            pathjoin(backup_dir, '%d.' % time() + basename(ring_file)))
 
647
        ring_data.save(ring_file)
651
648
        exit(EXIT_SUCCESS)
652
649
 
653
650
    def pretend_min_part_hours_passed():