style nits, no functional change
This commit is contained in:
		
							parent
							
								
									8ece8d0024
								
							
						
					
					
						commit
						b73766d399
					
				@ -288,8 +288,8 @@ TritonApi.prototype.getImage = function getImage(opts, cb) {
 | 
				
			|||||||
                    next();
 | 
					                    next();
 | 
				
			||||||
                    return;
 | 
					                    return;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                self.cloudapi.getImage({id: opts.name}, function (err, _img) {
 | 
					                self.cloudapi.getImage({id: opts.name}, function (err, img_) {
 | 
				
			||||||
                    img = _img;
 | 
					                    img = img_;
 | 
				
			||||||
                    if (err && err.restCode === 'ResourceNotFound') {
 | 
					                    if (err && err.restCode === 'ResourceNotFound') {
 | 
				
			||||||
                        err = new errors.ResourceNotFoundError(err,
 | 
					                        err = new errors.ResourceNotFoundError(err,
 | 
				
			||||||
                            format('image with id %s was not found', name));
 | 
					                            format('image with id %s was not found', name));
 | 
				
			||||||
@ -297,7 +297,6 @@ TritonApi.prototype.getImage = function getImage(opts, cb) {
 | 
				
			|||||||
                    next(err);
 | 
					                    next(err);
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					 | 
				
			||||||
        ]}, function done(err) {
 | 
					        ]}, function done(err) {
 | 
				
			||||||
            if (err) {
 | 
					            if (err) {
 | 
				
			||||||
                cb(err);
 | 
					                cb(err);
 | 
				
			||||||
@ -307,20 +306,19 @@ TritonApi.prototype.getImage = function getImage(opts, cb) {
 | 
				
			|||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
                cb(null, img);
 | 
					                cb(null, img);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            }
 | 
					        });
 | 
				
			||||||
        );
 | 
					 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
        var s = opts.name.split('@');
 | 
					        var s = opts.name.split('@');
 | 
				
			||||||
        var name = s[0];
 | 
					        var name = s[0];
 | 
				
			||||||
        var version = s[1];
 | 
					        var version = s[1];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        var _opts = {};
 | 
					        var listOpts = {};
 | 
				
			||||||
        if (version) {
 | 
					        if (version) {
 | 
				
			||||||
            _opts.name = name;
 | 
					            listOpts.name = name;
 | 
				
			||||||
            _opts.version = version;
 | 
					            listOpts.version = version;
 | 
				
			||||||
            _opts.useCache = opts.useCache;
 | 
					            listOpts.useCache = opts.useCache;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        this.cloudapi.listImages(_opts, function (err, imgs) {
 | 
					        this.cloudapi.listImages(listOpts, function (err, imgs) {
 | 
				
			||||||
            if (err) {
 | 
					            if (err) {
 | 
				
			||||||
                return cb(err);
 | 
					                return cb(err);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user